add argument task_limit for get_tasks to easily (de-)limit the amount…#1232
Closed
Chrxxxxs wants to merge 1 commit into
Closed
add argument task_limit for get_tasks to easily (de-)limit the amount…#1232Chrxxxxs wants to merge 1 commit into
Chrxxxxs wants to merge 1 commit into
Conversation
… of tasks requested
Conventional Commits Report😢 No conventional commits found. 👉 Learn more about the conventional commits usage at Greenbone. |
Contributor
|
Hi, I am sorry but I am not going to merge this PR. python-gvm implements and reflects the GMP interface on a low level basis. If you want something like this just create a function or class that generates a filter string and pass it to get_tasks. |
auto-merge was automatically disabled
June 4, 2025 06:14
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... of tasks requested
What
Added the argument task_limit which adds a "rows=x" to the filter_string that is being send with the request.
If a filter_id is being used, the task_limit is being ignored.
If a filter_string is used with "rows=x", the task_limit is being ignored.
If a filter_string is used without setting the "rows" parameter, the task_limit is used.
If no filter_string is set, the task_limit is used.
Why
When using the library I didn't realise that using get_tasks() to get "all" tasks only returns 10 tasks by default. To make it easier changeable and more obvious that there is a default limit, this parameter could get added. However I can also understand if it is not necessary as it can also be manually set by using 'filter_string="rows=x"'.
Checklist
Tests are created in: